<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="zh">
<head>
    <th:block th:include="include :: header('修改课程分数')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-score-edit" th:object="${eduScore}">
        <input name="scoreId" th:field="*{scoreId}" type="hidden">
        <div class="form-group">
            <label class="col-sm-3 control-label">学生姓名：</label>
            <div class="col-sm-8">
                <select name="scoreStudentid" class="form-control m-b" required th:field="*{scoreStudentid}"
                        th:with="type=${@Student.selectEduStudentList(null)}">
                    <option value="">请选择</option>
                    <option th:each="Student : ${type}" th:text="${Student.getStudentName()}"
                            th:value="${Student.getStudentId()}"></option>
                </select>
                <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">课程名：</label>
            <div class="col-sm-8">
                <select name="classCourseCourseId" class="form-control m-b" required th:field="*{classCourseCourseId}"
                        th:with="type=${@Course.selectEduCourseList(null)}">
                    <option value="">请选择</option>
                    <option th:each="Course : ${type}" th:text="${Course.getCourseName()}"
                            th:value="${Course.getCourseId()}"></option>
                </select>
                <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">分数：</label>
            <div class="col-sm-8">
                <input name="score" th:field="*{score}" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">考试描述：</label>
            <div class="col-sm-8">
                <textarea name="describe" class="form-control">[[*{describe}]]</textarea>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<script type="text/javascript">
    var prefix = ctx + "edusystem/score";
    $("#form-score-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-score-edit').serialize());
        }
    }
</script>
</body>
</html>